unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, RzPanel, StdCtrls, RzEdit, RzButton, RzTabs, Grids,
  AdvObj, BaseGrid, AdvGrid, VirtualTrees,FormEx_View;

type
  TForm1 = class(TFormExView)
    Tool_1: TRzToolbar;
    Btnx_1: TRzToolButton;
    Btnx_2: TRzToolButton;
    Btnx_3: TRzToolButton;
    Grid_1: TAdvStringGrid;
    Page_1: TRzPageControl;
    RzTabSheetTabSheet1: TRzTabSheet;
    RzTabSheetTabSheet2: TRzTabSheet;
    Virt_1: TVirtualStringTree;
    procedure Btnx_1Click(Sender: TObject);
    procedure Btnx_2Click(Sender: TObject);
  private
  protected
    procedure SetInitialize;override;
    procedure SetCommParams;override;
    procedure SetGridParams;override;
    procedure SetComboItems;override;
    procedure TryFreeAndNil;override;
  public
  end;

var
  Form1: TForm1;

implementation

uses
  Class_KzUtils,Class_KzDebug;

{$R *.dfm}

procedure TForm1.Btnx_1Click(Sender: TObject);
var
  I,M:Integer;
  ListA:TStringList;
  ListB:TStringList;
begin
  ListA:=TStringList.Create;
  ListA.LoadFromFile(TKzUtils.ExePath+'text1.txt');

  KzDebug.Started;
  KzDebug.TickLog('1:');  
  ListB:=TStringList.Create;
  for I:=0 to 2000 do
  begin
    for M:=0 to ListA.Count-1 do
    begin
      ListB.Add(ListA.Strings[M]);
    end;
  end;
  ListB.SaveToFile('text2.txt');
  KzDebug.TickLog('2:');

  
  FreeAndNil(ListA);
  FreeAndNil(ListB);
end;

procedure TForm1.Btnx_2Click(Sender: TObject);
begin
  KzDebug.Started;
  KzDebug.TickLog('1');
  Grid_1.RowCount:=32000;
end;

procedure TForm1.SetComboItems;
begin
  inherited;

end;

procedure TForm1.SetCommParams;
begin
  inherited;
  Virt_1.RootNodeCount:=322000;
  Virt_1.Header.Options:=Virt_1.Header.Options + [hoVisible];
end;

procedure TForm1.SetGridParams;
begin
  inherited;

end;

procedure TForm1.SetInitialize;
begin
  inherited;

end;

procedure TForm1.TryFreeAndNil;
begin
  inherited;

end;

end.
